package com.xq.shop.po;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

@Entity
@Table(name="user_point_record")
public class PointRecord {

	public static final int GRANT = 1;	//获取
	public static final int SYSTEM_GRANT = 2;	//系统赠送
	public static final int PAY = 3;	//支付使用
	
	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	private Long id;
	private Long user_id;
	private Integer type;
	private String order_sn;
	private Integer point;
	
	@Temporal(TemporalType.TIMESTAMP)
	@Column(updatable=false)
	private Date create_date = new Date();
	private String detail;
	
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}
	public Long getUser_id() {
		return user_id;
	}
	public void setUser_id(Long userId) {
		user_id = userId;
	}
	public String getOrder_sn() {
		return order_sn;
	}
	public void setOrder_sn(String orderSn) {
		order_sn = orderSn;
	}
	public Integer getPoint() {
		return point;
	}
	public void setPoint(Integer point) {
		this.point = point;
	}
	public Date getCreate_date() {
		return create_date;
	}
	public void setCreate_date(Date createDate) {
		create_date = createDate;
	}
	public String getDetail() {
		return detail;
	}
	public void setDetail(String detail) {
		this.detail = detail;
	}
	public Integer getType() {
		return type;
	}
	public void setType(Integer type) {
		this.type = type;
	}
}
